package com.asion.qkan.ui.contract;

import com.asion.qkan.entry.MusicBean;
import com.asion.qkan.ui.model.BaseModel;
import com.asion.qkan.ui.presenter.BasePresenter;
import com.asion.qkan.ui.view.BaseView;

/**
 * Created by asion on 16-10-12.
 */

public interface MusicContract {




    interface Model extends BaseModel {
        //定义model中的需要方法 以接口形式
        void getMusicListDatas(String string,OnMusicGetListener onMusicGetListener);
    }

    interface View extends BaseView<MusicBean.ResultBean> {
        //定义view中需要的接口
        //baseView<T> 可指定你要用的Entry返回数据
    }

    abstract class Presenter extends BasePresenter<View,Model> {
        //定义presenter需要的方法
        public abstract void setMusicDatas(String url);
    }

    interface OnMusicGetListener{
        void onMusicSuccess(MusicBean.ResultBean bean);
        void onMusicError(Throwable t);
    }

    interface OnMusicItemClickListener{
        void onMusicItemClick(int position, MusicBean.ResultBean.TracksBean resultBean);
    }
}
